<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%String path=request.getServletContext().getContextPath(); %>
<jsp:include page="/managerinc/header.jsp"></jsp:include>
	<section>
		<h2>定向搜索</h2>
		<input value="按照省份" id="provinceSearch" type="button">
		<input value="按照市名" id="citySearch" type="button">
		
		<hr/>
		<div  id="showSelect"></div>
		<hr/>
		<div id="showScenics"></div>
	</section>
<jsp:include page="/managerinc/footer.jsp"></jsp:include>
<script>
$(function(){
	
	$("#provinceSearch").click(function(){
		
		var url="/Travel/ScenicController?action=provinceAll";
		$.get(url,function(mes){
			$("#showSelect").empty();
			$("#showScenics").empty();	
			 $("#showSelect").append(mes); 
		})
	})
	
	$("#citySearch").click(function(){
		var url="/Travel/ScenicController?action=cityAll";
		$.get(url,function(mes){
			$("#showSelect").empty();
			$("#showScenics").empty();	
			$("#showSelect").append(mes);
		})
	})
	
	$("#priceMax").click(function(){
		var url="/Travel/ScenicController?action=moneyFind";
		$.get(url,function(mes){
			$("#showSelect").empty();
			$("#showScenics").empty();	
			$("#showSelect").append(mes);
		})
	})
})
function showProvince(id){
		 var url="/Travel/ScenicController?action=provinceFind&provinceId="+id;
			$.get(url,function(mes){
			$("#showScenics").empty();
			$("#showScenics").append(mes);
				})
	}
	
function showCity(id){
		 var url="/Travel/ScenicController?action=cityFind&cityId="+id;
		$.get(url,function(mes){	
		$("#showScenics").empty();	
		$("#showScenics").append(mes); 
		})
		}	
		
function cityPage(pageNum){
	var url="/Travel/ScenicController?action=cityAll&pageNum="+pageNum;
	$.post(url,function(mes){
		$("#showSelect").empty();
		$("#showSelect").append(mes);
	})
}

function provincePage(pageNum){
	var url="/Travel/ScenicController?action=provinceAll&pageNum="+pageNum;
	$.post(url,function(mes){
		$("#showSelect").empty();
		$("#showSelect").append(mes);
	})
}

/* locaion href="/Travel/ScenicController?action=moneyFind"; */
</script>